package org.gikolet.ch2.android.activity;

import java.util.List;

import org.gikolet.ch2.android.viewer.Viewer;

import android.os.Bundle;

import com.google.inject.Binding;
import com.google.inject.TypeLiteral;

public class GikoletActivity extends HorizontalScrollerActivity {

	public GikoletActivity() {
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		List<Binding<Viewer>> findBindingByType = getInjector()
				.findBindingsByType(TypeLiteral.get(Viewer.class));

		for (Binding<Viewer> binding : findBindingByType) {
			Viewer viewer = getInjector().getInstance(binding.getKey());

			addViewer(viewer);
		}
	}
}
